/*!
 *  coer环境配置
 *  window.$core
 */
(function (global, factory) {
  typeof exports === 'object' && typeof module !== 'undefined'
    ? (module.exports = factory())
    : typeof define === 'function' && define.amd
    ? define(factory)
    : ((global = global || self), (global.$apiCore = factory()));
})(this, function () {
  'use strict';
  let u = {
    safeArea: {},
  };

  // 获取遮罩层
  u.getsafeArea = () => {
    let returnValue = {};
    if (u.safeArea.top) {
      returnValue = u.safeArea;
    } else {
      if (typeof api !== 'undefined') {
        returnValue = api.safeArea;
        u.safeArea = api.safeArea;
      } else {
        returnValue = {
          top: 20,
          bottom: 10,
        };
      }
    }
    return returnValue;
  };

  return u;
});
